body {
  background: $footer-bg;
  color: $text;
  font: 300 #{$base-font-size}/#{$base-line-height} $base-font-family;
  text-align: center;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
}

article {
  p {
    img {
      max-width: 100%;
      display:block;
      margin-left: auto;
      margin-right: auto;
    }
  }
}

a {
  border-bottom: 1px dotted $primary-bg;
  color: $text;
  text-decoration: none;
  -webkit-transition: background 0.3s, color 0.3s;
  transition: background 0.3s, color 0.3s;
}

blockquote {
  padding: 15px 30px 15px 15px;
  margin: 20px 0 0 10px;
  background-color: rgba(204, 122, 111, 0.1);
  border-left: 10px solid rgba(191, 87, 73, 0.2);
}

#fb_oss a {
  border: 0;
}

h1, h2, h3, h4 {
  font-family: $header-font-family;
}

.headerBarContainer {
  background: $primary-bg;
  color: $header-text;
  height: $header-height;
  opacity: 0.0;
  padding: $header-ptop 0 $header-pbot;
  position: relative;
  -webkit-transition: opacity 0.2s ease-in-out;
  transition: opacity 0.2s ease-in-out;
  width: 100%;
  z-index: 9999;

  &.visible {
    opacity: 1.0;
  }

  a {
    border: 0;
    color: $header-text;
  }

  header {
    height: $header-height;
    margin: 0 auto;
    max-width: $content-width;
    padding: 0 20px;
    position: relative;
    text-align: left;

    img {
      height: 30px;
      margin-right: 10px;
    }

    h2 {
      display: inline;
      font-family: $header-font-family;
      font-size: 16px;
      letter-spacing: -0.02em;
      line-height: 18px;
      position: relative;
      top: -9px;
    }
  }

  .navigationWrapper {
    display: inline-block;
    font-family: $header-font-family;

    &.navigationFull {
      display: none;
    }

    &.navigationSlider {
      position:absolute;
      right: 12px;
      z-index:99;

      .navSlideout {
        cursor: pointer;
        font-size: 24px;
        padding-top: 5px;
        -webkit-transition: -webkit-transform 0.3s;
        transition: transform 0.3s;
      }

      .slidingNav {
        background: #222;
        box-sizing: border-box;
        height: 100vh;
        opacity: 0;
        overflow: hidden;
        padding: 0;
        position: absolute;
        right: -12px;
        top: $header-height + $header-pbot;
        -webkit-transition: opacity 0.5s, width 0.5s;
        transition: opacity 0.5s, width 0.5s;
        width: 0;

        &.slidingNavActive {
          opacity: 1;
          width: 75vw;
        }

        ul {
          list-style: none;
          padding-left: 0;

          li {
            padding: 0;
            a {
              border-bottom: 1px solid #111;
              display:block;
              padding: 4vw 12px;
              -webkit-transition: background-color 0.3s;
              transition: background-color 0.3s;

              &:focus,
              &:hover {
                background: $primary-bg;
              }
            }
          }
        }
      }
    }
  }
}

.homeContainer {
  background: $primary-bg;
  color: $header-text;

  a {
    color: $header-text;
  }

  .homeWrapper {
    padding-bottom: 2em;
    padding-top: 2em;
    text-align: left;

      .wrapper {
        margin: 0px auto;
        max-width: $content-width;
        padding: 0 20px;
      }

      .projectLogo {
        img {
          height: 100px;
          margin-bottom: 0px;
        }
      }

      h1#project_title {
        font-family: $header-font-family;
        font-size: 300%;
        letter-spacing: -0.08em;
        line-height: 1em;
        margin-bottom: 80px;
      }

      h2#project_tagline {
        font-family: $header-font-family;
        font-size: 200%;
        letter-spacing: -0.04em;
        line-height: 1em;
      }
  }
}

.wrapper {
  margin: 0px auto;
  max-width: $content-width;
  padding: 0 20px;
}

.footerContainer {
  background: $footer-bg;

  .footerWrapper {
    padding-top: 4vh;
    padding-bottom: 4vh;
  }
}


.projectLogo {
  display: none;

  img {
    height: 100px;
    margin-bottom: 0px;
  }
}

section#intro {
  margin: 40px 0;
}

.fbossFontLight {
  font-family: $base-font-family;
  font-weight: 300;
  font-style: normal;
}

.fb-like {
  display: block;
  margin-bottom: 50px;
  width: 100%;
}

a.blockButton {
  background: $primary-bg;
  border-radius: 4px;
  border: 2px solid transparent;
  clear: both;
  color: $header-text;
  display: inline-block;
  font-family: $header-font-family;
  font-size: 120%;
  padding: 10px 20px;
  position: relative;
  -webkit-transition: background-color 0.2s, color 0.2s, border 0.2s;
  transition: background-color 0.2s, color 0.2s, border 0.2s;

  .mainContainer .mainWrapper &:hover,
  .mainContainer .mainWrapper &:focus {
    background: $secondary-bg;
    border: 2px solid $primary-bg;
    color: $primary-bg;
  }

  .homeContainer &{
    background: $light-color;
    color: $light-text-color;

    &:hover,
    &:focus {
      background: $primary-bg;
      border: 2px solid $light-color;
      color: $light-text-color;
    }
  }
}

.promoSection {
  font-size: 125%;
  line-height: 1.6em;
  margin: 0;
  position: relative;
  z-index: 99;

  a {
    border-bottom: 3px solid $light-color;
    color: lighten($light-color, 20%);
  }
}

.center {
  display: block;
  text-align: center;
}

.mainContainer {
  background: $secondary-bg;
  overflow: auto;
  padding: 0 4vw;

  .mainWrapper {
    padding-bottom: 4vh;
    padding-top: 4vh;
    text-align: left;

    .blogWrapper .blogPostWrapper {
      .post {
        margin-bottom: 50px;
      }
    }

    .blockButton {
      margin: 4vh 0;

      &.marginsmall {
        margin: 1vh 0;
      }
    }

    .allShareBlock {
      margin: -12px;
      padding: 1vh 0;

      .pluginBlock {
        margin: 12px;
        padding: 0;
      }
    }

    a {
      &:hover,
      &:focus {
        background: $primary-bg;
        color: $header-text;
      }
    }

    em {
      font-style: italic;
    }

    strong, b {
      font-weight: bold;
    }

    h1 {
      font-size: 300%;
      line-height: 1em;
      padding: 1.4em 0 1em;
      text-align: center;
    }

    h2 {
      font-size: 250%;
      line-height: 1em;
      padding: 1.4em 0 1em;
      text-align: left;
    }

    h3 {
      font-size: 150%;
      line-height: 1em;
      padding: 1em 0 0.8em;
    }

    p {
      padding: 0.8em 0;
    }

    ol {
      list-style: decimal;
    }

    ul {
      list-style: disc;
    }

    ol, ul {
      padding-left: 24px;
      li {
        padding-bottom: 4px;
        padding-left: 6px;
      }
    }

    strong {
      font-weight: bold;
    }

    nav.toc {
      position: relative;
      section {
        background: $primary-bg;
        color: $header-text;
        margin-bottom: 2vh;
        padding: 12px 24px;

        .navGroup {
          h3 {
            display: none;
          }

          &:not(.navGroupActive) {
            display: none;
          }
        }
      }

      .toggleNav {
        position: relative;
      }

      .navToggle {
        background: $primary-bg;
        color: $header-text;
        font-size: 12px;
        height: 24px;
        position: absolute;
        right: 0;
        text-align: center;
        top: 0;
        width: 24px;

        i {
          cursor: pointer;
        }
      }

      .toggleNavActive {
        section {
          .navGroup {
            display: block;

            h3 {
              display: block;
            }

            ul li {
              display: block;
            }
          }

          ul li {
            display: block;
            padding-bottom: 4px;
          }
        }
      }

      h3 {
        font-size: 125%;
        padding-right: 24px;
        padding-top: 0.4em;
      }

      ul {
        padding-left: 0;
        padding-right: 24px;

        li {
          list-style-type: none;
          padding-bottom: 0;
          padding-left: 0;

          &:not(.navListItemActive) {
            display: none;
          }

          a {
            border-bottom: none;
            border-left: 4px solid transparent;
            color: $header-text;
            display: inline-block;
            margin-bottom: 0.6vh;
            padding: 1vh 0 0.4vh 8px;
            -webkit-transition: border-color 0.3s;
            transition: border-color 0.3s;

            &:hover,
            &:focus {
              border-left: 4px solid $nav-text;
            }

            &.navItemActive {
              border-left: 4px solid $header-text;
            }
          }
        }
      }
    }

    .post {
      background: #fff;
      padding: 6vw 6vw 8vh;
      position: relative;

      a {
        color: $link-color;

        &:hover,
        &:focus {
          color: #fff;
        }
      }

      h2 {
        border-bottom: 4px solid $primary-bg;
        font-size: 130%;
      }

      h3 {
        border-bottom: 1px solid $primary-bg;
        font-size: 110%;
      }

      .authorPhoto {
        border-radius: 50%;
        height: 50px;
        left: 50%;
        margin-left: -25px;
        overflow: hidden;
        position: absolute;
        top: -25px;
        width: 50px;
      }

      .post-header {
        padding: 0 0 1em;
        text-align: center;

        h1 {
          font-size: 150%;
          line-height: 1em;
          padding: 0.4em 0 0;

          a {
            border: none;
          }
        }

        .post-authorName {
          color: $primary-bg;
          font-family: $header-font-family;
          margin-top: -2vw;
          text-align: center;
        }

        .post-meta {
          color: $primary-bg;
          font-family: $header-font-family;
          text-align: center;
        }
      }

      .postSocialPlugins {
        padding-top: 1em;
      }

      .docPagination {
        background: $primary-bg;
        bottom: 0px;
        left: 0px;
        position: absolute;
        right: 0px;

        .pager {
          display: inline-block;
          width: 50%;
        }

        .pagingNext {
          float: right;
          text-align: right;
        }

        a {
          border: none;
          color: $header-text;
          display: block;
          padding: 4px 12px;

          &:hover {
            background-color: $secondary-bg;
            color: $text;
          }

          .pagerLabel {
            display: inline;
          }

          .pagerTitle {
            display: none;
          }
        }
      }
    }

    .posts {
      .post {
        margin-bottom: 6vh;
      }
    }
  }
}

.gridBlock {
  margin: 20px 0;
  padding: 2vh 0;

  .twoByGridBlock {
    padding: 0;

    img {
      margin-top: 6vh;
      max-width: 100%;
    }

    &.featureBlock  h3 {
      font-size: 150%;
      margin: 20px 0;
      padding-bottom: 0;
    }
  }

  .gridClear {
    clear: both;
  }

  .leftBlock {
    padding: 40px 0;
    text-align: left;
  }
}

#integrations_title  {
  font-size: 250%;
  margin: 80px 0;
}

.ytVideo {
  height: 0;
  overflow: hidden;
  padding-bottom: 53.4%; /* 16:9 */
  padding-top: 25px;
  position: relative;
}

.ytVideo iframe,
.ytVideo object,
.ytVideo embed {
  height: 100%;
  left: 0;
  position: absolute;
  top: 0;
  width: 100%;
}

@media only screen and (min-width: 480px) {
  h1#project_title {
    font-size: 500%;
  }

  h2#project_tagline {
    font-size: 250%;
  }

  .projectLogo {
    img {
      margin-bottom: 10px;
      height: 200px;
    }
  }

  .headerBarContainer {
    .navigationWrapper {
      &.navigationSlider {

        .slidingNav {
          right: -22px;

          &.slidingNavActive {
            width: 50vw;
          }

          ul {
            li {
              a {
                padding: 1vw 12px;
              }
            }
          }
        }
      }
    }
  }

  .gridBlock {
    margin: -20px;
    overflow: auto;
    padding: 1vh 0;

    .twoByGridBlock {
      box-sizing: border-box;
      float: left;
      padding: 20px;
      text-align: center;
      width: 50%;
    }

    .centerInGrid {
      margin-left: 25%;
    }

    .leftBlock {
      padding: 40px 20px;
    }
  }

  .mainContainer {
    .mainWrapper {
      nav.toc {
        h3 {
          padding-top: 0.4em;
        }

        ul li a {
          margin-bottom: 0;
          padding-bottom: 0.2vh;
          padding-top: 0;
          display: block;
        }

        .navToggle {
          top: 12px;
        }
      }

      .post {
        padding: 4vw 4vw 4em;

        h2 {
          font-size: 180%;
        }

        h3 {
          font-size: 120%;
        }

        .post-header {
          padding: 1em 0;
        }

        .docPagination {
          a {
            .pagerLabel {
              display: none;
            }
            .pagerTitle {
              display: inline;
            }
          }
        }
      }
    }
  }
}

@media only screen and (min-width: 900px) {
  .homeContainer {
    .homeWrapper {
      padding-bottom: 4em;
      position: relative;

      #inner {
        box-sizing: border-box;
        max-width: 600px;
        padding-right: 40px;
      }

      .projectLogo {
        align-items: center;
        bottom: 0;
        display: flex;
        justify-content: flex-end;
        left: 0;
        padding: 2em 20px 4em;
        position: absolute;
        right: 20px;
        top: 0;

        img {
          height: 100%;
        }
      }
    }
  }

  .headerBarContainer {
    .navigationWrapper {
      nav {
        padding: 0 1em;
        position: relative;
        top: -9px;

        ul {
          margin: 0 -0.4em;
          li {
            display: inline-block;

            a {
              padding: 14px 0.4em;
              border: 0;
              color: $nav-text;
              display: inline-block;

              &:hover {
                color: $header-text;
              }
            }

            &.navItemActive {
              a {
                color: $header-text;
              }
            }
          }
        }
      }

      &.navigationFull {
        display: inline-block;
      }

      &.navigationSlider {
        display: none;
      }
    }
  }
}

@media only screen and (min-width: 1024px) {
  .mainContainer {
    .mainWrapper {
      .blogWrapper {
        display: flex;
        nav.toc {
          width: 400px;
        }
      }
      nav.toc {
        box-sizing: border-box;
        display: inline-block;
        border-right: 12px solid $secondary-bg;
        width: 285px;
        vertical-align: top;

        .navToggle {
          display: none;
        }

        .toggleNav {
          section {
            .navGroup {
              display: block;

              h3 {
                display: block;
              }

              ul li {
                display: block;
              }
            }

            ul li {
              display: block;
              padding-bottom: 4px;
            }
          }
        }
        ul li a {
          font-size: 14px;
          padding-bottom: 0.1vh;
        }
      }

      .post {
        box-sizing: border-box;
        display: inline-block;
        padding: 2vw 24px 4em;
        width: 590px;

        .post-header {
          h1 {
            font-size: 250%;
          }
        }
      }

      .posts {
        display: inline-block;
        width: 590px;

        .post {
          margin-bottom: 4vh;
          width: 100%;
        }
      }
    }
  }
}

@media only screen and (min-width: 1040px) {
  .mainContainer {
    .mainWrapper {
      nav.toc {
        width: 300px;
      }
    }
  }
}

@media only screen and (min-width: 1200px) {
  .homeContainer {
    .homeWrapper {
      #inner {
        max-width: 750px;
      }
    }
  }

  .headerBarContainer {
    header {
      max-width: 1100px;
    }
  }

  .wrapper {
    max-width: 1100px;
  }

  .mainContainer .mainWrapper {
    .post, .posts {
      width: 760px;
    }
  }
}

@media only screen and (min-width: 1500px) {
  .homeContainer {
    .homeWrapper {
      #inner {
        max-width: 1100px;
        padding-bottom: 40px;
        padding-top: 40px;
      }
    }
  }

  .headerBarContainer {
    header {
      max-width: 1400px;
    }
  }

  .wrapper {
    max-width: 1400px;
  }

  .mainContainer .mainWrapper {
    .post, .posts {
      width: 1035px;
    }
  }
}
